-
Notifications
You must be signed in to change notification settings - Fork 848
Refactors rate_limit plugin with YAML configurations #10559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I can review this when it is ready |
08a267d to
5a306fb
Compare
Great! Almost there :). The refactoring focuses entirely on the global plugin only, leaving the remap plugin as-is. One hope with this refactoring and change to a reloadable YAML configuration is that we can add more features and rate limiting rules more easily. |
e51f9c3 to
6e41166
Compare
eb8263b to
39f3ecd
Compare
|
@zwoop let me know when it is ready to review. It looks like it is but I am not sure if you are having more changes in your mind. |
|
[approve ci autest] |
|
|
||
| try { | ||
| config = YAML::LoadFile(yaml_file); | ||
| } catch (YAML::BadFile &e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are not going to change the exception right? if not then why not const.
the one below too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just copied this pattern from other places in the code :). I can change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hope it wasn't my code! that would be a shame 🤣
39f3ecd to
05b5f2a
Compare
05b5f2a to
0024a9e
Compare
shukitchan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks ok.
|
[approve ci] |
0024a9e to
f6a1206
Compare
| An optional metric tag to use instead of the default. When a tag is not specified | ||
| the plugin will use the FQDN of the SNI associated with each rate limiter instance | ||
| created during plugin initialization. | ||
| No queue is enable without this configuration directive, but it can also be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
f6a1206 to
e063742
Compare
|
[approve ci] |
e67c560 to
bad2f5f
Compare
bad2f5f to
d5cabf2
Compare
|
I updated this to use the updated version of the registration API. |
d5cabf2 to
b842c59
Compare
Besides majorly refactoring a lot of the global plugin code, this PR makes the following changes: